ostbuild: Fix DB saving with /tmp and builddir in different volumes
authorAdrian Perez <aperez@igalia.com>
Thu, 26 Apr 2012 15:21:27 +0000 (18:21 +0300)
committerColin Walters <walters@verbum.org>
Fri, 4 May 2012 20:16:16 +0000 (16:16 -0400)
commit0e266d3f9268bfaf260788902c611c5266106a9b
tree9c5061143480587590721830d51207dd2dce1be7
parent717cec46c342371321b1a26cefd6b8c7fa3dddae
ostbuild: Fix DB saving with /tmp and builddir in different volumes

This fixes the case where /tmp resides in one volume, and the build
directory in a different one: by storing the temporary file in the
same directory as the target one, we avoid the case in which os.rename()
would cross file system boundaries.

Reviewed-by: Colin Walters <walters@verbum.org>
src/ostbuild/pyostbuild/jsondb.py